﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DslModeling = global::Microsoft.VisualStudio.Modeling;
using DslDesign = global::Microsoft.VisualStudio.Modeling.Design;
using DslDiagrams = global::Microsoft.VisualStudio.Modeling.Diagrams;
using System.ComponentModel.Composition;

namespace devtm.AutoMapper
{

    public partial class AutoMapperDiagramBase
    {

        private DslDiagrams.NodeShape GetSourceShapeForLeftConnector(LeftConnector leftConnector)
        {
            return (DslDiagrams::NodeShape)leftConnector.ParentShape;
        }

        private DslModeling.ModelElement GetSourceRolePlayerForLinkMappedByLeftConnector(LeftConnector instanceOfLeftConnector)
        {
            return instanceOfLeftConnector.ParentShape.ModelElement;
        }

        //------------------------------------------------------------

        private DslDiagrams.NodeShape GetSourceShapeForRightConnector(RightConnector rightConnector)
        {
            return (DslDiagrams::NodeShape)rightConnector.ParentShape;
        }

        private DslModeling.ModelElement GetSourceRolePlayerForLinkMappedByRightConnector(RightConnector instanceOfRightConnector)
        {
            return instanceOfRightConnector.ParentShape.ModelElement;
        }

    }

    public partial class AutoMapperDiagram
    {

        protected override void OnChildConfiguring(DslDiagrams.ShapeElement child, bool createdDuringViewFixup)
        {
            try
            {
                base.OnChildConfiguring(child, createdDuringViewFixup);
            }
            catch (Exception)
            {
                
            }
        }
    }
}

